/* eslint-disable */
import request from "@/request";

/** addDiscussion POST /api/api/culture/discussion/add */
export async function addDiscussionUsingPost(
  body: API.CulturePartDiscussion,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>("/api/api/culture/discussion/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** deleteDiscussion POST /api/api/culture/discussion/delete */
export async function deleteDiscussionUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteDiscussionUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/api/culture/discussion/delete",
    {
      method: "POST",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getDiscussionById GET /api/api/culture/discussion/get */
export async function getDiscussionByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDiscussionByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseCulturePartDiscussion_>(
    "/api/api/culture/discussion/get",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** listDiscussionByPage GET /api/api/culture/discussion/list/page */
export async function listDiscussionByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listDiscussionByPageUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCulturePartDiscussion_>(
    "/api/api/culture/discussion/list/page",
    {
      method: "GET",
      params: {
        // current has a default value: 1
        current: "1",
        // pageSize has a default value: 10
        pageSize: "10",
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** updateDiscussion POST /api/api/culture/discussion/update */
export async function updateDiscussionUsingPost(
  body: API.CulturePartDiscussion,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/api/culture/discussion/update",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** vote POST /api/api/culture/discussion/vote */
export async function voteUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.voteUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/api/culture/discussion/vote", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
